<?php
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class PictureController extends Controller
{
	//展示图片
	public $assign = [];
	public function indexImg()
	{
		$model_pictrue = new \App\Model\Picture();
		$info = $model_pictrue->getImg();
		$this->assign['info'] = $info;
		return view('admin.picture.index_img',$this->assign);
	}
	//添加图片
	public function addImg(){
		return view('admin.picture.add_img',$this->assign);
	}
	//执行添加
	public function doaddImg(Request $request){
		$news_id = $request->post('news_id');
		$tate = $request->post('state');
		$file = $request->post('file');
        $path = '/update/images/2018';  
        $rule =['jpg','png','gif'];  
        //进行上传  
        $model_pictrue = new \App\Model\Picture();
        $info = $model_pictrue->uploadImg();
     
	}
	
}

?>